package com.scut.wordskillerbackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.scut.wordskillerbackend.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("SELECT * FROM user WHERE username = #{username} and password = #{password}")
    User selectByUserIdAndPassword(User user);

    @Select("SELECT * FROM user WHERE token = #{token}")
    User selectByToken(String token);

}